3.1.21 \(\int \frac {\cos ^3(a+b x^2)}{x^3} \, dx\) [21]

Optimal. Leaf size=91 \[ -\frac {3 \cos \left (a+b x^2\right )}{8 x^2}-\frac {\cos \left (3 \left (a+b x^2\right )\right )}{8 x^2}-\frac {3}{8} b \text {CosIntegral}\left (b x^2\right ) \sin (a)-\frac {3}{8} b \text {CosIntegral}\left (3 b x^2\right ) \sin (3 a)-\frac {3}{8} b \cos (a) \text {Si}\left (b x^2\right )-\frac {3}{8} b \cos (3 a) \text {Si}\left (3 b x^2\right ) \]

[Out]

-3/8*cos(b*x^2+a)/x^2-1/8*cos(3*b*x^2+3*a)/x^2-3/8*b*cos(a)*Si(b*x^2)-3/8*b*cos(3*a)*Si(3*b*x^2)-3/8*b*Ci(b*x^
2)*sin(a)-3/8*b*Ci(3*b*x^2)*sin(3*a)

________________________________________________________________________________________

Rubi [A]
time = 0.14, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3485, 3461, 3378, 3384, 3380, 3383} \begin {gather*} -\frac {3}{8} b \sin (a) \text {CosIntegral}\left (b x^2\right )-\frac {3}{8} b \sin (3 a) \text {CosIntegral}\left (3 b x^2\right )-\frac {3}{8} b \cos (a) \text {Si}\left (b x^2\right )-\frac {3}{8} b \cos (3 a) \text {Si}\left (3 b x^2\right )-\frac {3 \cos \left (a+b x^2\right )}{8 x^2}-\frac {\cos \left (3 \left (a+b x^2\right )\right )}{8 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x^2]^3/x^3,x]

[Out]

(-3*Cos[a + b*x^2])/(8*x^2) - Cos[3*(a + b*x^2)]/(8*x^2) - (3*b*CosIntegral[b*x^2]*Sin[a])/8 - (3*b*CosIntegra
l[3*b*x^2]*Sin[3*a])/8 - (3*b*Cos[a]*SinIntegral[b*x^2])/8 - (3*b*Cos[3*a]*SinIntegral[3*b*x^2])/8

Rule 3378

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(c + d*x)^(m + 1)*(Sin[e + f*x]/(d*(m
 + 1))), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3380

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3383

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3384

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[c*(f/d) + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3461

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Cos[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rule 3485

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandTrigReduce[(e
*x)^m, (a + b*Cos[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[p, 1] && IGtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\cos ^3\left (a+b x^2\right )}{x^3} \, dx &=\int \left (\frac {3 \cos \left (a+b x^2\right )}{4 x^3}+\frac {\cos \left (3 a+3 b x^2\right )}{4 x^3}\right ) \, dx\\ &=\frac {1}{4} \int \frac {\cos \left (3 a+3 b x^2\right )}{x^3} \, dx+\frac {3}{4} \int \frac {\cos \left (a+b x^2\right )}{x^3} \, dx\\ &=\frac {1}{8} \text {Subst}\left (\int \frac {\cos (3 a+3 b x)}{x^2} \, dx,x,x^2\right )+\frac {3}{8} \text {Subst}\left (\int \frac {\cos (a+b x)}{x^2} \, dx,x,x^2\right )\\ &=-\frac {3 \cos \left (a+b x^2\right )}{8 x^2}-\frac {\cos \left (3 \left (a+b x^2\right )\right )}{8 x^2}-\frac {1}{8} (3 b) \text {Subst}\left (\int \frac {\sin (a+b x)}{x} \, dx,x,x^2\right )-\frac {1}{8} (3 b) \text {Subst}\left (\int \frac {\sin (3 a+3 b x)}{x} \, dx,x,x^2\right )\\ &=-\frac {3 \cos \left (a+b x^2\right )}{8 x^2}-\frac {\cos \left (3 \left (a+b x^2\right )\right )}{8 x^2}-\frac {1}{8} (3 b \cos (a)) \text {Subst}\left (\int \frac {\sin (b x)}{x} \, dx,x,x^2\right )-\frac {1}{8} (3 b \cos (3 a)) \text {Subst}\left (\int \frac {\sin (3 b x)}{x} \, dx,x,x^2\right )-\frac {1}{8} (3 b \sin (a)) \text {Subst}\left (\int \frac {\cos (b x)}{x} \, dx,x,x^2\right )-\frac {1}{8} (3 b \sin (3 a)) \text {Subst}\left (\int \frac {\cos (3 b x)}{x} \, dx,x,x^2\right )\\ &=-\frac {3 \cos \left (a+b x^2\right )}{8 x^2}-\frac {\cos \left (3 \left (a+b x^2\right )\right )}{8 x^2}-\frac {3}{8} b \text {Ci}\left (b x^2\right ) \sin (a)-\frac {3}{8} b \text {Ci}\left (3 b x^2\right ) \sin (3 a)-\frac {3}{8} b \cos (a) \text {Si}\left (b x^2\right )-\frac {3}{8} b \cos (3 a) \text {Si}\left (3 b x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.12, size = 90, normalized size = 0.99 \begin {gather*} -\frac {3 \cos \left (a+b x^2\right )+\cos \left (3 \left (a+b x^2\right )\right )+3 b x^2 \text {CosIntegral}\left (b x^2\right ) \sin (a)+3 b x^2 \text {CosIntegral}\left (3 b x^2\right ) \sin (3 a)+3 b x^2 \cos (a) \text {Si}\left (b x^2\right )+3 b x^2 \cos (3 a) \text {Si}\left (3 b x^2\right )}{8 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x^2]^3/x^3,x]

[Out]

-1/8*(3*Cos[a + b*x^2] + Cos[3*(a + b*x^2)] + 3*b*x^2*CosIntegral[b*x^2]*Sin[a] + 3*b*x^2*CosIntegral[3*b*x^2]
*Sin[3*a] + 3*b*x^2*Cos[a]*SinIntegral[b*x^2] + 3*b*x^2*Cos[3*a]*SinIntegral[3*b*x^2])/x^2

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.19, size = 162, normalized size = 1.78

method result size
risch \(\frac {3 \,{\mathrm e}^{-3 i a} \pi \,\mathrm {csgn}\left (b \,x^{2}\right ) b}{16}-\frac {3 \,{\mathrm e}^{-3 i a} \sinIntegral \left (3 b \,x^{2}\right ) b}{8}+\frac {3 i {\mathrm e}^{-3 i a} \expIntegral \left (1, -3 i b \,x^{2}\right ) b}{16}+\frac {3 \,{\mathrm e}^{-i a} \pi \,\mathrm {csgn}\left (b \,x^{2}\right ) b}{16}-\frac {3 \,{\mathrm e}^{-i a} \sinIntegral \left (b \,x^{2}\right ) b}{8}+\frac {3 i {\mathrm e}^{-i a} \expIntegral \left (1, -i b \,x^{2}\right ) b}{16}-\frac {3 i {\mathrm e}^{3 i a} b \expIntegral \left (1, -3 i b \,x^{2}\right )}{16}-\frac {3 i {\mathrm e}^{i a} b \expIntegral \left (1, -i b \,x^{2}\right )}{16}-\frac {3 \cos \left (b \,x^{2}+a \right )}{8 x^{2}}-\frac {\cos \left (3 b \,x^{2}+3 a \right )}{8 x^{2}}\) \(162\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x^2+a)^3/x^3,x,method=_RETURNVERBOSE)

[Out]

3/16*exp(-3*I*a)*Pi*csgn(b*x^2)*b-3/8*exp(-3*I*a)*Si(3*b*x^2)*b+3/16*I*exp(-3*I*a)*Ei(1,-3*I*x^2*b)*b+3/16*exp
(-I*a)*Pi*csgn(b*x^2)*b-3/8*exp(-I*a)*Si(b*x^2)*b+3/16*I*exp(-I*a)*Ei(1,-I*b*x^2)*b-3/16*I*exp(3*I*a)*b*Ei(1,-
3*I*x^2*b)-3/16*I*exp(I*a)*b*Ei(1,-I*b*x^2)-3/8*cos(b*x^2+a)/x^2-1/8*cos(3*b*x^2+3*a)/x^2

________________________________________________________________________________________

Maxima [C] Result contains complex when optimal does not.
time = 0.39, size = 98, normalized size = 1.08 \begin {gather*} \frac {3}{16} \, {\left ({\left (-i \, \Gamma \left (-1, 3 i \, b x^{2}\right ) + i \, \Gamma \left (-1, -3 i \, b x^{2}\right )\right )} \cos \left (3 \, a\right ) + {\left (-i \, \Gamma \left (-1, i \, b x^{2}\right ) + i \, \Gamma \left (-1, -i \, b x^{2}\right )\right )} \cos \left (a\right ) - {\left (\Gamma \left (-1, 3 i \, b x^{2}\right ) + \Gamma \left (-1, -3 i \, b x^{2}\right )\right )} \sin \left (3 \, a\right ) - {\left (\Gamma \left (-1, i \, b x^{2}\right ) + \Gamma \left (-1, -i \, b x^{2}\right )\right )} \sin \left (a\right )\right )} b \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)^3/x^3,x, algorithm="maxima")

[Out]

3/16*((-I*gamma(-1, 3*I*b*x^2) + I*gamma(-1, -3*I*b*x^2))*cos(3*a) + (-I*gamma(-1, I*b*x^2) + I*gamma(-1, -I*b
*x^2))*cos(a) - (gamma(-1, 3*I*b*x^2) + gamma(-1, -3*I*b*x^2))*sin(3*a) - (gamma(-1, I*b*x^2) + gamma(-1, -I*b
*x^2))*sin(a))*b

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 108, normalized size = 1.19 \begin {gather*} -\frac {6 \, b x^{2} \cos \left (3 \, a\right ) \operatorname {Si}\left (3 \, b x^{2}\right ) + 6 \, b x^{2} \cos \left (a\right ) \operatorname {Si}\left (b x^{2}\right ) + 8 \, \cos \left (b x^{2} + a\right )^{3} + 3 \, {\left (b x^{2} \operatorname {Ci}\left (3 \, b x^{2}\right ) + b x^{2} \operatorname {Ci}\left (-3 \, b x^{2}\right )\right )} \sin \left (3 \, a\right ) + 3 \, {\left (b x^{2} \operatorname {Ci}\left (b x^{2}\right ) + b x^{2} \operatorname {Ci}\left (-b x^{2}\right )\right )} \sin \left (a\right )}{16 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)^3/x^3,x, algorithm="fricas")

[Out]

-1/16*(6*b*x^2*cos(3*a)*sin_integral(3*b*x^2) + 6*b*x^2*cos(a)*sin_integral(b*x^2) + 8*cos(b*x^2 + a)^3 + 3*(b
*x^2*cos_integral(3*b*x^2) + b*x^2*cos_integral(-3*b*x^2))*sin(3*a) + 3*(b*x^2*cos_integral(b*x^2) + b*x^2*cos
_integral(-b*x^2))*sin(a))/x^2

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos ^{3}{\left (a + b x^{2} \right )}}{x^{3}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x**2+a)**3/x**3,x)

[Out]

Integral(cos(a + b*x**2)**3/x**3, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 185 vs. \(2 (80) = 160\).
time = 0.42, size = 185, normalized size = 2.03 \begin {gather*} -\frac {3 \, {\left (b x^{2} + a\right )} b^{2} \operatorname {Ci}\left (3 \, b x^{2}\right ) \sin \left (3 \, a\right ) - 3 \, a b^{2} \operatorname {Ci}\left (3 \, b x^{2}\right ) \sin \left (3 \, a\right ) + 3 \, {\left (b x^{2} + a\right )} b^{2} \operatorname {Ci}\left (b x^{2}\right ) \sin \left (a\right ) - 3 \, a b^{2} \operatorname {Ci}\left (b x^{2}\right ) \sin \left (a\right ) + 3 \, {\left (b x^{2} + a\right )} b^{2} \cos \left (a\right ) \operatorname {Si}\left (b x^{2}\right ) - 3 \, a b^{2} \cos \left (a\right ) \operatorname {Si}\left (b x^{2}\right ) - 3 \, {\left (b x^{2} + a\right )} b^{2} \cos \left (3 \, a\right ) \operatorname {Si}\left (-3 \, b x^{2}\right ) + 3 \, a b^{2} \cos \left (3 \, a\right ) \operatorname {Si}\left (-3 \, b x^{2}\right ) + b^{2} \cos \left (3 \, b x^{2} + 3 \, a\right ) + 3 \, b^{2} \cos \left (b x^{2} + a\right )}{8 \, b^{2} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)^3/x^3,x, algorithm="giac")

[Out]

-1/8*(3*(b*x^2 + a)*b^2*cos_integral(3*b*x^2)*sin(3*a) - 3*a*b^2*cos_integral(3*b*x^2)*sin(3*a) + 3*(b*x^2 + a
)*b^2*cos_integral(b*x^2)*sin(a) - 3*a*b^2*cos_integral(b*x^2)*sin(a) + 3*(b*x^2 + a)*b^2*cos(a)*sin_integral(
b*x^2) - 3*a*b^2*cos(a)*sin_integral(b*x^2) - 3*(b*x^2 + a)*b^2*cos(3*a)*sin_integral(-3*b*x^2) + 3*a*b^2*cos(
3*a)*sin_integral(-3*b*x^2) + b^2*cos(3*b*x^2 + 3*a) + 3*b^2*cos(b*x^2 + a))/(b^2*x^2)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\cos \left (b\,x^2+a\right )}^3}{x^3} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x^2)^3/x^3,x)

[Out]

int(cos(a + b*x^2)^3/x^3, x)

________________________________________________________________________________________